package com.jjyu.controller;

import com.jjyu.entity.RestaurantFavorite;
import com.jjyu.service.RestaurantFavoriteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/favorites")
public class RestaurantFavoriteController {

    @Autowired
    private RestaurantFavoriteService restaurantFavoriteService;

    @PostMapping("/add")
    public ResponseEntity<?> addFavorite(@RequestBody RestaurantFavorite favorite) {
        return restaurantFavoriteService.addFavorite(favorite);
    }
}
